package com.hiof.moraa.server.service.model;

/**
 *
 * @author Bergy
 */
public class CartesianCoordinate {

    private double x;
    private double y;
    private double z;

    public CartesianCoordinate(double x, double y, double z) {
        this.x = x;
        this.y = y;
        this.z = z;
    }

    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }

    public double getZ() {
        return z;
    }

    public void setZ(double z) {
        this.z = z;
    }

    public static double distance(CartesianCoordinate c1, CartesianCoordinate c2) {
        return Math.sqrt((c1.x - c2.x) * (c1.x - c2.x)
                + (c1.y - c2.y) * (c1.y - c2.y)
                + (c1.z - c2.z) * (c1.z - c2.z));
    }
}
